package com.mall.common.service.impl;

import javax.annotation.Resource;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.mall.common.dao.AdvertPositionDao;
import com.mall.common.domain.content.AdvertPositionDomain;
import com.mall.common.service.AdvertPositionService;


/**
 * Service实现类 - 促销活动
 */
@Service
@Transactional(readOnly=true)
public class AdvertPositionServiceImpl extends BaseServiceImpl<AdvertPositionDomain, Long> implements AdvertPositionService {
 
	@Resource
	public void setBaseDao(AdvertPositionDao advertPositionDao) {
		super.setBaseDao(advertPositionDao);
	}

	@Override
	@CacheEvict(value="adPosition",allEntries=true)
	@Transactional(propagation=Propagation.REQUIRED)
	public AdvertPositionDomain updateByUpdater(AdvertPositionDomain entity) {
		return super.updateByUpdater(entity);
	}

	@Override
	@CacheEvict(value="adPosition",allEntries=true)
	@Transactional(propagation=Propagation.REQUIRED)
	public void persist(AdvertPositionDomain entity) {
		super.persist(entity);
	}

	@Override
	@CacheEvict(value="adPosition",allEntries=true)
	@Transactional(propagation=Propagation.REQUIRED)
	public void remove(Long[] ids) {
		super.remove(ids);
	}
	
}
